package com.xp.dto.flow;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import java.util.Map;

/**
 * 流程执行请求DTO
 * 
 * @author xp
 * @since 2025-01-01
 */
@Data
@Schema(description = "流程执行请求DTO")
public class FlowExecutionRequest {

    @NotBlank(message = "流程编码不能为空")
    @Schema(description = "流程编码", required = true, example = "user_register_flow")
    private String flowCode;

    @Schema(description = "流程版本", example = "1.0.0")
    private String flowVersion;

    @Schema(description = "输入参数", example = "{\"username\":\"testuser\",\"email\":\"test@example.com\"}")
    private Map<String, Object> inputParams;

    @Schema(description = "输入数据", example = "{\"username\":\"testuser\",\"email\":\"test@example.com\"}")
    private Object inputData;

    @Schema(description = "链路追踪ID", example = "trace-12345")
    private String traceId;

    @Schema(description = "创建人ID", example = "1")
    private Long creatorId;

    @Schema(description = "是否异步执行", example = "false")
    private Boolean async = false;

    @Schema(description = "超时时间（秒）", example = "300")
    private Integer timeout;
}